package xyz.ddlnt.user.general.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.ddlnt.commonutil.result.Result;
import xyz.ddlnt.model.dto.CategoryDTO;
import xyz.ddlnt.servicegeneralclient.client.CategoryToMgFeignClient;

import java.util.List;

/**
 * @author ZZULI_SE 210910
 * @data 2025/5/11 1:03
 */
@Slf4j
@Tag(name = "分类管理接口(转管理端）")
@RestController
@RequestMapping(("/category"))
public class CategoryToMgController {
    @Resource
    private CategoryToMgFeignClient categoryToMgFeignClient;

    @Operation(summary = "获取所有分类名称")
    @GetMapping("getAllName")
    public Result<List<CategoryDTO>> getAllCategoryName() {
        return categoryToMgFeignClient.getAllCategoryName();
    }

}
